
package de.berlin.fu.inf.nbi.rdflinda.numbers;

import org.nlogo.api.*;

/**
 * @author Daniel Graff Wrapper class for random double values
 */
public class RandomDouble
extends AbstractRandomNumber
{

    /**
     * Returns a random double value
     * 
     * @param args
     *            The arguments
     * @param arg1
     *            The context
     * @return Returns a random double value
     * @throws ExtensionException
     *             The exception
     * @throws LogoException
     */
    public Double report(Argument args[], Context arg1)
    throws ExtensionException, LogoException {
        double base = args[0].getDoubleValue();
        return secureRandom.nextDouble() * base;
    }

}
